package services

import "gin-demo/models"

func GetArticles() ([]models.Article, error) {

	return []models.Article{
		{ID: "1", Title: "First Article", Content: "This is the first article."},
		{ID: "2", Title: "Second Article", Content: "This is the second article."},
	}, nil
}

// GetArticle 获取单个文章
func GetArticle(id string) (*models.Article, error) {
	// 这里应该添加获取单个文章的逻辑，可能会从数据库中查询数据
	// 为了简化，我们返回一个静态的文章对象
	return &models.Article{ID: id, Title: "Sample Article", Content: "This is a sample article."}, nil
}
